{% extends "base.html" %}
{% block title %}photo_upload{% endblock %}
{% block body %}
    <div class="row" style="margin-top: 20px">
        <div class="col"></div>
        <div class="col-8">
            <h2 style="text-align: center">上传图片</h2>
            <form action="{{ url_for('question_answer.picture_show') }}" method="POST" enctype="multipart/form-data">
                <div class="mb-3">
                    <input type="text" name="title" class="form-control"
                           placeholder="请输入标题">
                </div>
                <div class="mb-3">
                    <input type="file" class="form-control" name="content"
                           placeholder="请输入内容">
                </div>
                {% for message in get_flashed_messages() %}
            <div class="form-group">
                <div class="text-danger">{{ message }}</div>
            </div>
            {% endfor %}
                <div class="mb-3" style="text-align: right">
                    <button class="btn btn-primary">发布</button>
                </div>
            </form>
        </div>
        <div class="col"></div>
    </div>
{% endblock %}